Link http://smart-invoice.vn/API/login
Dùng user password đăng nhâp vào trang hoadondientu.gdt.gov.vn để test
Input :
{
"username":"0316459946",
"password":"12345678aA@",
"captcha":"",
"key":""
}
Output captcha thuế để user nhập captcha và thuế cấp token có thời hạn trong 24h:
Trong kết quả trả về thì content là hình ảnh captcha code ví dụ show captcha bằng javascript:
var captchaContent = ketqua.content;
// Hiển thị nội dung của captcha trên modal
$('#captcha-modal').html(captchaContent);
Hoặc Output token nếu token còn hạn ví dụ như sau:
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjEyOTEsImlzcyI6Imh0dHA6Ly9yZWFkaW52b2ljZS52aWV0dGVsc29sdXRpb24uY29tLnZuL0FQSS9sb2dpbiIsImlhdCI6MTY5MDE3NjkxOSwiZXhwIjoxNjkwMTgwNTE5LCJuYmYiOjE2OTAxNzY5MTksImp0aSI6IjE4bWlUWFhnN01vZ2RscU8ifQ.yR2G7TPy9rAAAcVUjE7Q72VkfEqQ04nMTNNrfU7bEyg
Mẫu json import postman :
curl --location 'http://smart-invoice.vn/API/login' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic YWRtaW46MTIzNDU2NzhhQUBA' \
--header 'Cookie: XSRF-TOKEN=eyJpdiI6Ijc0eUo1S3l2azVNeTZEajlycHhmSHc9PSIsInZhbHVlIjoiM01HbW1XWEN2K0lKQmxBRGUzU3FFc3dobGNtcFlmWnNJZEIySXlkbFQxYVBZSDFhQ093OGpjTCtDT0NIZDljaUN5T2NVSU1XTzJBcG5STUE2ZGx3V1E9PSIsIm1hYyI6IjJiOGUzMWRhZjM0MzQzNWUwYTIzNDg0Y2ExZWRlMjE2Y2QxOTAyOWJmOWQwMDAxZjUwNDY5ODBiYmVlMzQyZjAifQ%3D%3D; laravel_session=eyJpdiI6IjZKQUhob25IUERGTWQ4aVJRemVlRXc9PSIsInZhbHVlIjoiOUNuc0U4akR6UkNhc1VIakVpYkJHT2J5RFwvbzdJeHNFa3daVk5CaW1NUHdvVEgwOEp4ZUpCTUZrektHVXZHUU5YdnJ1MW5cLzFhOVVnZ0laaVJhNDNFQT09IiwibWFjIjoiZTM4MGM3MTM2MDkyNWZjZDVhZDBhNjNhZDE5YWQ5Y2M3N2QxNjI4MWViZDlkMTU0NjAwY2M4MzgwODFkMGQ3NyJ9' \
--data-raw '{
"username":"0316459946",
"password":"12345678aA@",
"captcha":"",
"key":""
}'
Link http://smart-invoice.vn/API/get_purchase/0316459946
Input :
{
"fromdate":"01/07/2022",
"todate":"05/08/2023",
"nbmst":""
}
Output:
[
{
"khmshdon": "1",
"khhdon": "K23DAD",
"shdon": "1259052",
"ntao": "2023-07-18T09:52:59.716Z",
"nbten": "CÔNG TY DỊCH VỤ MOBIFONE KHU VỰC 2 - CHI NHÁNH TỔNG CÔNG TY VIỄN THÔNG MOBIFONE",
"nbmst": "0100686209-002",
"nbdchi": null,
"tgtcthue": "486277",
"ttcktmai": null,
"tgtthue": "48628",
"tgtttbso": "534905",
"dvtte": "VND",
"cqt": "7901",
"thtttoan": null,
"shdgoc": null,
"tchat": "1",
"tgia": null,
"tthai": "1",
"ttxly": "6",
"thttltsuat": "[]"
}
]
curl --location 'http://smart-invoice.vn/API/get_purchase/0316459946' \
--header 'token: eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIwMzA0NDEzOTYxIiwidHlwZSI6MiwiZXhwIjoxNjkxMzAwNjA3LCJpYXQiOjE2OTEyMTQyMDd9.E-uuXPsHGt4lB1gykiUAoCzWz1DOOjAhsFUaJ_Tu7D8eYTZ5S4jFqO7W2pB9v4Aq0Lu9d1VytaZv7LG-9hJ5kw' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjQ1MywiaXNzIjoiaHR0cDovL2xvY2FsaG9zdC9jbG91ZGNhL3B1YmxpYy9BUEkvbG9naW4iLCJpYXQiOjE2ODEwMjY4MjQsImV4cCI6MTY4MTAzMDQyNCwibmJmIjoxNjgxMDI2ODI0LCJqdGkiOiJ3ZGtNYlJNajlBZmJXQkxvIn0._m6eyFgaamOtN8plKF8iAZ-ytJ7K7lckrJQQmSWWnAc' \
--header 'Cookie: XSRF-TOKEN=eyJpdiI6Ijc0eUo1S3l2azVNeTZEajlycHhmSHc9PSIsInZhbHVlIjoiM01HbW1XWEN2K0lKQmxBRGUzU3FFc3dobGNtcFlmWnNJZEIySXlkbFQxYVBZSDFhQ093OGpjTCtDT0NIZDljaUN5T2NVSU1XTzJBcG5STUE2ZGx3V1E9PSIsIm1hYyI6IjJiOGUzMWRhZjM0MzQzNWUwYTIzNDg0Y2ExZWRlMjE2Y2QxOTAyOWJmOWQwMDAxZjUwNDY5ODBiYmVlMzQyZjAifQ%3D%3D; laravel_session=eyJpdiI6IjZKQUhob25IUERGTWQ4aVJRemVlRXc9PSIsInZhbHVlIjoiOUNuc0U4akR6UkNhc1VIakVpYkJHT2J5RFwvbzdJeHNFa3daVk5CaW1NUHdvVEgwOEp4ZUpCTUZrektHVXZHUU5YdnJ1MW5cLzFhOVVnZ0laaVJhNDNFQT09IiwibWFjIjoiZTM4MGM3MTM2MDkyNWZjZDVhZDBhNjNhZDE5YWQ5Y2M3N2QxNjI4MWViZDlkMTU0NjAwY2M4MzgwODFkMGQ3NyJ9' \
--data '{
"fromdate":"01/07/2022",
"todate":"05/08/2023",
"nbmst":""
}'
Link http://smart-invoice.vn/API/get_purchase_items/0316459946
Input :
{
"fromdate":"01/07/2022",
"todate":"05/08/2023",
"nbmst":""
}
Output:
[
{
"ntao": "2023-08-02T05:58:55.722Z",
"nbmst": "0301394608",
"nbdchi": "02 Nguyễn Thông - Phường Võ Thị Sáu - Quận 3 - TP Hồ Chí Minh",
"nbten": "BỆNH VIỆN DA LIỄU",
"khmshdon": "2",
"khhdon": "K23TNT",
"shdon": "355282",
"dvtte": "VND",
"cqt": "7901",
"thtttoan": "TM",
"shdgoc": null,
"tchat": "1",
"tgia": "1",
"tthai": "1",
"ttxly": "6",
"STT": "1",
"TChat": "1",
"MHHDVu": "AZA003",
"THHDVu": "Azasun 120ml - Gamma",
"DVTinh": "Chai",
"SLuong": "1",
"DGia": "99000",
"ThTien": "99000",
"TSuat": "",
"TLCKhau": "0",
"STCKhau": "0"
}
]
curl --location 'http://smart-invoice.vn/API/get_purchase_items/0316459946' \
--header 'token: eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIwMzA0NDEzOTYxIiwidHlwZSI6MiwiZXhwIjoxNjkxMzAwNjA3LCJpYXQiOjE2OTEyMTQyMDd9.E-uuXPsHGt4lB1gykiUAoCzWz1DOOjAhsFUaJ_Tu7D8eYTZ5S4jFqO7W2pB9v4Aq0Lu9d1VytaZv7LG-9hJ5kw' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjQ1MywiaXNzIjoiaHR0cDovL2xvY2FsaG9zdC9jbG91ZGNhL3B1YmxpYy9BUEkvbG9naW4iLCJpYXQiOjE2ODEwMjY4MjQsImV4cCI6MTY4MTAzMDQyNCwibmJmIjoxNjgxMDI2ODI0LCJqdGkiOiJ3ZGtNYlJNajlBZmJXQkxvIn0._m6eyFgaamOtN8plKF8iAZ-ytJ7K7lckrJQQmSWWnAc' \
--header 'Cookie: XSRF-TOKEN=eyJpdiI6Ijc0eUo1S3l2azVNeTZEajlycHhmSHc9PSIsInZhbHVlIjoiM01HbW1XWEN2K0lKQmxBRGUzU3FFc3dobGNtcFlmWnNJZEIySXlkbFQxYVBZSDFhQ093OGpjTCtDT0NIZDljaUN5T2NVSU1XTzJBcG5STUE2ZGx3V1E9PSIsIm1hYyI6IjJiOGUzMWRhZjM0MzQzNWUwYTIzNDg0Y2ExZWRlMjE2Y2QxOTAyOWJmOWQwMDAxZjUwNDY5ODBiYmVlMzQyZjAifQ%3D%3D; laravel_session=eyJpdiI6IjZKQUhob25IUERGTWQ4aVJRemVlRXc9PSIsInZhbHVlIjoiOUNuc0U4akR6UkNhc1VIakVpYkJHT2J5RFwvbzdJeHNFa3daVk5CaW1NUHdvVEgwOEp4ZUpCTUZrektHVXZHUU5YdnJ1MW5cLzFhOVVnZ0laaVJhNDNFQT09IiwibWFjIjoiZTM4MGM3MTM2MDkyNWZjZDVhZDBhNjNhZDE5YWQ5Y2M3N2QxNjI4MWViZDlkMTU0NjAwY2M4MzgwODFkMGQ3NyJ9' \
--data '{
"fromdate":"01/08/2023",
"todate":"04/08/2023",
"nbmst":""
}'